<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/8/9
  Time: 14:20
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>家居用品</title>
    <link rel="shortcut icon" href="${pageContext.request.contextPath}/static/img/higou.png" />
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/css/head.css" />
    <script src="${pageContext.request.contextPath}/static/js/jquery-3.3.1.min.js" type="text/javascript" charset="utf-8"></script>
    <style type="text/css">
        .mid {
            position: relative;
            margin: 20px auto;
            width: 900px;
        }

        .mid_top {
            border-bottom: 2px solid #000;
            position: relative;
        }

        .mid_top_left {
            display: inline-block;

        }

        .mid_top_left img {
            margin-top: 8px;
        }
        .mid_top_right{
            position: absolute;
            right: 10px;
            top: 13px;
            color: #ed145b;
        }
        .mid_center{
            width: 900px;


        }
        .goods{
            position: relative;
            display: inline-block;
            margin-top: 5px;
            width: 270px;
            height: 380px;
            margin-right: 20px;
            padding-left: 5px;
            border-top: 0.5px lightgray solid;
            border-left: 0.5px lightgray solid;
            box-shadow: 5px 5px 6px -3px lightgray;
        }
        .goods img{
            width: 270px;
            height: 300px;

        }
        .details{
            width: 270px;
            position: relative;
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
        }
        .price{
            margin-top: 15px;
        }

        #top{
            position: fixed;
            right: 40px;
            bottom: 40px;
        }
    </style>
</head>

<body>
<div class="head">
    <div class="head_top">
        <div class="head_top_mid">
            <ul class="head_ul head_ul_left">
                <c:if test="${not empty sessionScope.user}">
                    <li>欢迎 [${sessionScope.user.u_name}] 来到嗨购! <a href="exit.jsp">[退出]</a></li>
                </c:if>
                <c:if test="${empty sessionScope.user}">
                    <li>欢迎来到嗨购!</li>
                    <li>
                        <a href="login.jsp">请登录</a>
                    </li>
                    <li>
                        <a href="register.jsp">快速注册</a>
                    </li>
                </c:if>
            </ul>
            <ul class="head_ul head_ul_right">
                <li>
                    <a href="#"><span class="img1"></span>收藏品牌</a>
                </li>
                <li>
                    <a href="${pageContext.request.contextPath}/UserInfoServlet.do">我的嗨购</a>
                </li>
                <li>正品保证</li>
            </ul>
        </div>
    </div>
    <div class="head_center">
        <div class="logo">

        </div>
        <div class="head_center_mid"><form action="${pageContext.request.contextPath}/SearchGoodsServlet.do" method="post">
            <div class="head_center_mid_left head_center_mid_all">
                <input type="text" name="search" id="search" maxlength="250"/>
            </div>
            <div class="head_center_mid_right head_center_mid_all">
                <input type="submit" value="搜索" id="ss">
            </div></form>
        </div>
        <div class="cart_box">
            <a href="${pageContext.request.contextPath}/SearchCarServlet.do">
                <div class="cart_box_img">
                    <img src="static/img/cart.gif" width="28px" height="28px" />
                </div>
                <span style="">
								去购物车结算
							</span>
            </a>
        </div>
    </div>
    <div class="head_bot">
        <div class="head_bot_mid">
            <div class="head_bot_mid_nav">
                <a href="${pageContext.request.contextPath}/index.jsp">首页</a>
            </div>
            <div class="head_bot_mid_nav">
                <a  href="${pageContext.request.contextPath}/SearchKindServlet.do?k_name=女装">女装</a>
            </div>
            <div class="head_bot_mid_nav">
                <a  href="${pageContext.request.contextPath}/SearchKindServlet.do?k_name=男装">男装</a>
            </div>
            <div class="head_bot_mid_nav" >
                <a  href="${pageContext.request.contextPath}/SearchKindServlet.do?k_name=运动户外">运动户外</a>
            </div>
            <div class="head_bot_mid_nav" style="background: #ed145b;">
                <a  href="#">家居用品</a>
            </div>
            <div class="head_bot_mid_nav">
                <a  href="${pageContext.request.contextPath}/SearchKindServlet.do?k_name=医疗保健">医疗保健</a>
            </div>

            <div class="head_bot_right">
                <img src="static/img/z_01new.jpg" />
                <img src="static/img/z02.jpg" />
                <img src="static/img/z03.jpg" />

            </div>
        </div>

    </div>
</div>

<div class="mid ">
    <div class="mid_top ">
        <div class="mid_top_left ">
            <img src="static/img/day.png " height="25px "/>
        </div>
        <span class="mid_top_right">每日十点上新</span>
    </div>
    <div class="mid_center">
        <c:forEach var="item" items="${sessionScope.kindList}">
            <div class="goods"><a target="_blank" href="${pageContext.request.contextPath}/ShowGoodServlet.do?g_id=${item.g_id}"><img src="static/img/goods/${item.g_img}.jpg"/>
                <div class="details">
                    <span>${item.g_info}</span>
                    <div class="price">
                        <b style="color:#ed145b;">活动价:${item.g_now*item.e_dis}</b> &nbsp;&nbsp;&nbsp;&nbsp;<span style="text-decoration: line-through;">原价:${item.g_now}</span>
                    </div>
                </div>
            </a>
            </div>
        </c:forEach>
    </div>
</div>
<div class="footer">
    <div class="footer_logo">

    </div>
    <div class="footer_bot">
        <div class="footer_bot_mid">
            关于嗨购<br />
            COPYRIGHT © 2010-2018 青岛浮生渡传媒有限公司 www.higo.com 保留一切权利。 <br />客服热线：400-123-8888
            京公网安备 11010102001226 | 京ICP证111033号 | 食品经营许可证 <br />营业执照 | ICP许可证 | 出版物经营许可证
        </div>
    </div>
</div>
<div id="top">
    <a href="#"><img src="static/img/back_top.png"/></a>
</div>
</body>
<script>
    $('#top').click(function(){$('html,body').animate({scrollTop: '0px'}, 500);});
</script>
</html>
